package com.freemyleft.left.zapp.util;

/**
 * Created by FreeMyleft on 2017/12/3.
 */

import android.content.res.Resources;
import android.util.DisplayMetrics;

import com.freemyleft.left.zapp.app.Left;

/**
 * 用来测量的一些工具方法
 */
public class DimenUtil {
    public static int getScreenWidth(){
        final Resources resources= Left.getApplicationContext().getResources();
        final DisplayMetrics dm=resources.getDisplayMetrics();
        return dm.widthPixels;
    }
    public static int getScreenHeight(){
        final Resources resources= Left.getApplicationContext().getResources();
        final DisplayMetrics dm=resources.getDisplayMetrics();
        return dm.heightPixels;
    }
}
